<template>
	<view>
		<view class="center">
			<view class="title">
				详细信息
			</view>
			<view class="msg">
				<view class="">身高</view>
				<view class="">{{list.height ? list.height+'cm' : '暂无'}}</view>
			</view>
			<view class="msg">
				<view class="">体重</view>
				<view class="" >{{list.weight ? list.weight+'kg' : '暂无'}}</view>
			</view>
			<view class="msg">
				<view class="">血型</view>
				<view class="" v-if="list.bloodType">{{list.bloodType == '其他血型'? '其他血型' :list.bloodType+'型'}}</view>
				<view class=""v-else>暂无</view>
			</view>
			<view class="msg">
				<view class="">血糖</view>
				<view class="">{{list.bloodSugar ? list.bloodSugar + 'mmol/L' : '暂无'}}</view>
			</view>
			<view class="msg">
				<view class="">血压</view>
				<view class="">{{list.bloodPressure ? list.bloodPressure + 'mmHg' :'暂无'}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {selectOrderInfo} from '@/apis/order/index.js'
	export default {
		data() {
			return {
				number:'',
				list:'',
			}
		},
		onLoad(option) {
			this.number = option.number
			this.get()
		},
		methods: {
			async get(){
				let number = this.number
				let res =await selectOrderInfo({number})
				if(res.success){
					this.list=res.object.healthFile
				}else{
					plus.nativeUI.toast('获取错误~')
					// uni.showToast({
					// 	icon:'error',
					// 	title:'获取错误~'
					// })
					setTimeout(()=>{
						uni.navigateBack({
							delta:1
						})
					},500)
				}
				console.log(res)
			}
		}
	}
</script>

<style scoped lang="scss">
	.center{
		background: #FFFFFF;
		padding: 0 40rpx;
		box-sizing: border-box;
		.title{
			margin-top: 32rpx;
			color: #333333;
			font-size: 36rpx;
		}
		.msg{
			// width: 100%;
			height: 108rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
			box-sizing: border-box;
		}
	}
</style>
